<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>订单详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/app/admin/component/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/app/admin/component/pear/css/pear.css" media="all">
    <style>
        .order-info {margin-bottom: 10px;}
        .order-info .layui-form-label {width: 100px;}
        .order-info .layui-input-inline {width: 300px;}
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-header">订单信息</div>
            <div class="layui-card-body">
                <div class="layui-form order-info">
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单号：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">{$order.order_no}</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">会员信息：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">{$order.member_name} ({$order.member_card_no})</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单金额：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">￥{$order.amount}</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">优惠金额：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">￥{$order.discount_amount}</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付金额：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">￥{$order.payment_amount}</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付方式：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">{$order.payment_method}</div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单状态：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {if $order.status == 0}
                                <span class="layui-badge layui-bg-gray">已取消</span>
                                {elseif $order.status == 1}
                                <span class="layui-badge layui-bg-blue">待支付</span>
                                {else}
                                <span class="layui-badge layui-bg-green">已完成</span>
                                {/if}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">创建时间：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">{$order.created_at}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">商品信息</div>
            <div class="layui-card-body">
                <table class="layui-table">
                    <thead>
                        <tr>
                            <th>商品名称</th>
                            <th>单价</th>
                            <th>数量</th>
                            <th>小计</th>
                        </tr>
                    </thead>
                    <tbody>
                        {foreach $order.items as $item}
                        <tr>
                            <td>{$item.goods_name}</td>
                            <td>￥{$item.price}</td>
                            <td>{$item.quantity}</td>
                            <td>￥{$item.subtotal}</td>
                        </tr>
                        {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <script src="/app/admin/component/layui/layui.js"></script>
    <script src="/app/admin/component/pear/pear.js"></script>
</body>
</html> 